﻿<Application
    x:Class="Demo05.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Demo05">

    <Application.Resources>

        <DataTemplate x:Name="TextTemplate">
            <TextBlock>
                <Run Text="Truck" />
                <Run Text="{Binding Text}" />
                <Run Text="@" />
                <Run Text="{Binding X}" />
                <Run Text="x" />
                <Run Text="{Binding Y}" />
            </TextBlock>
        </DataTemplate>

        <DataTemplate x:Key="TruckTemplate">
            <Grid RenderTransformOrigin="0.5,0.5">
                <Grid.RenderTransform>
                    <CompositeTransform ScaleX="0.75" ScaleY="0.75"/>
                </Grid.RenderTransform>
                <Path Data="M49.333451,32.500999C52.739668,32.500999 55.5,35.261534 55.5,38.667999 55.5,42.074265 52.739668,44.834999 49.333451,44.834999 45.927334,44.834999 43.167002,42.074265 43.167002,38.667999 43.167002,35.261534 45.927334,32.500999 49.333451,32.500999z M17.331951,32.500999C20.738443,32.500999 23.499001,35.261534 23.499001,38.667999 23.499001,42.074265 20.738443,44.834999 17.331951,44.834999 13.925558,44.834999 11.165001,42.074265 11.165001,38.667999 11.165001,35.261534 13.925558,32.500999 17.331951,32.500999z M45.33309,10.666466L45.33309,21.333979 59.533747,21.333979C59.533747,20.667264,58.994743,19.800048,58.497335,19.068132L52.882675,11.296578C52.882675,11.296578,52.286366,10.666466,51.856663,10.666466z M39.999728,5.3330002L51.999865,5.3330002 64,21.333979C64,23.860029 64,34.668243 64,34.668243 64,36.136972 62.802088,37.334999 61.333271,37.334999L58.68224,37.334999C58.028635,32.741005 54.106688,29.183035 49.333136,29.183035 44.56228,29.183035 40.640334,32.738506 39.98413,37.332298 38.523111,37.321899 37.333,36.131773 37.332999,34.668243L37.332999,7.9997129C37.333,6.5309037,38.531011,5.333,39.999728,5.3330002z M0,0L34.667002,0 34.667002,37.334999 26.255428,37.334999C25.607023,32.970264 21.87909,29.611536 17.332151,29.611536 12.785311,29.611536 9.0612698,32.970264 8.4128227,37.334999L0,37.334999z" Stretch="Uniform" Fill="Blue" Width="50" Height="50" />
                <TextBlock Text="{Binding Text}" Foreground="White" Margin="8" />
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="CarTemplate">
            <Grid RenderTransformOrigin="0.5,0.5">
                <Grid.RenderTransform>
                    <CompositeTransform ScaleX="0.75" ScaleY="0.75"/>
                </Grid.RenderTransform>
                <Path Data="F1M853.318,586.859L849.87,578.053C849.212,576.35,847.782,574.894,845.093,574.894L840.144,574.894 831.717,574.894 826.713,574.894C824.022,574.894,822.593,576.35,821.936,578.053L818.488,586.859 814.553,586.859 814.553,599.105 814.587,599.105 814.587,603.219 817.993,603.219 817.993,606.854C817.993,611.331,824.393,611.277,824.393,606.854L824.393,603.219 835.899,603.219 835.907,603.219 847.417,603.219 847.417,606.854C847.417,611.277,853.813,611.331,853.813,606.854L853.813,603.219 857.219,603.219 857.219,599.105 857.219,591.839 857.219,586.859 853.318,586.859z M821.295,596.265C819.663,596.265 818.341,594.915 818.341,593.249 818.341,591.584 819.663,590.232 821.295,590.232 822.929,590.232 824.251,591.584 824.251,593.249 824.251,594.915 822.929,596.265 821.295,596.265z M835.907,586.784L835.9,586.784 835.894,586.784 822.061,586.784 824.695,579.867C825.027,578.878,825.519,578.163,826.673,578.153L835.894,578.153 835.9,578.153 835.907,578.153 845.133,578.153C846.286,578.163,846.779,578.878,847.11,579.867L849.749,586.784 835.907,586.784z M850.51,596.265C848.878,596.265 847.555,594.915 847.555,593.249 847.555,591.584 848.878,590.232 850.51,590.232 852.144,590.232 853.466,591.584 853.466,593.249 853.466,594.915 852.144,596.265 850.51,596.265z" Stretch="Uniform" Fill="Red" Width="50" Height="50" />
                <TextBlock Text="{Binding Text}" Foreground="White" Margin="0,18,0,0" HorizontalAlignment="Center" />
            </Grid>
        </DataTemplate>

    </Application.Resources>

</Application>
